package fr.umlv.jee.jawp.persistence.dao;

import java.util.List;

import fr.umlv.jee.jawp.persistence.object.Order;
import fr.umlv.jee.jawp.persistence.object.Product;
import fr.umlv.jee.jawp.persistence.object.Status;

public interface IOrderDAO {


	/*************************************
	 *				Create
	 *************************************/

	public Order createNewOrder(String customer);

	/*************************************
	 *				Getters
	 *************************************/

	public List<Order> getOrders();

	public List<Order> getOrdersByCustomer(String customer);
	
	public List<Order> getNonKartOrdersByCustomer(String customer);

	public Order getOrderById(int id);

	public List<Product> getProductByOrder(Order order);

	public long getNbProductByOrder(Order order);

	public long getNbOrderByCustomer(String customer);

	/*************************************
	 *				Setter
	 *************************************/

//	public void setProductQuantity(Product p, int quantity);

	public void addProduct(Order o, Product p);

	public void removeProduct(Order o, Product p);

	public void saveOrder(Order order);

	public void saveOrders(List<Order> orders);

	public void setStatus(Order order, Status status);

	/*************************************
	 *				Deletion
	 *************************************/

	public void deleteOrder(int id);

	public void deleteOrdersByCustomer(int customerId);
	
	public void clearDB();

}